﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FJERP.Model;
using FJERP.DAL;
using System.Data.SqlClient;
using System.Data;

namespace FJERP.BLL
{
   public  class WareHoseBLL
    {
        WareHoseDAL dal = new WareHoseDAL();
        /// <summary>
        /// 显示库房
        /// </summary>
        /// <returns></returns>
        public List<WareHose> ShowWareHose()
        {
            return dal.ShowWareHose();
        }
        /// <summary>
        /// 添加库房
        /// </summary>
        /// <param name="w"></param>
        /// <returns></returns>
        public int AddWareHose(WareHose w)
        {
            return dal.AddWareHose(w);
        }
        /// <summary>
        /// 删除仓库
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Del(int id)
        {
            return dal.Del(id);
        }
        /// <summary>
        /// 根据id获取仓库单条信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DataTable GetWareHoseById(int id)
        {
            return dal.GetWareHoseById(id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="w"></param>
        /// <returns></returns>
        public int UpdWareHose(WareHose w)
        {
            return dal.UpdWareHose(w);
        }

        /// <summary>
        /// 根据名称查询
        /// </summary>
        /// <param name="WareHose_Name"></param>
        /// <returns></returns>
        public List<WareHose> SeaarchWareHose(string WareHose_Name)
        {
            return dal.SeaarchWareHose(WareHose_Name);
        }
      
        /// <summary>
       /// 总条数
       /// </summary>
       /// <returns></returns>
        public int countWareHose()
        {
            return dal.countWareHose();
        }
    }
}
